
/**
\file
Defines general use lua related exceptions.
\author Sean Tromans
*/

#ifndef	SUN_LUA_EXCEPTIONS_HPP
#define	SUN_LUA_EXCEPTIONS_HPP

#if !defined(SUN_DISABLE_LUA)

#include <sun/exception/exception.hpp>

namespace sun
{

	namespace lua
	{

		/** Base lua related exception. */
		class exception : public sun::exception
		{
		public:
			exception( std::string const & message )
				:	sun::exception( message )
			{}
		};

		/** Exception thrown when an abstract function is called without having first been defined in lua. */
		class not_implemented_exception : public sun::lua::exception
		{
		public:
			not_implemented_exception( std::string const & function )
				:	sun::lua::exception( nmn::create_string( "sun::lua::not_implemented_exception: Attempt to call abstract function, \"%1%\", with no definition.", function ) )
			{}
		};

	}

}

#endif

#endif	//SUN_LUA_EXCEPTIONS_HPP
